package tiled.simple.gwt.client;

public class Camera {
	public int x=0;
	public int y=0;
	public int x_new=0;
	public int y_new=0;
	public int canvasWidth=0;
	public int canvasHeight=0;

	public int mapWidth=0;
	public int mapHeight=0;
	
	
	public Camera(){
	}


	public void setPosition(int x, int y) {
		this.x_new=x;
		this.y_new=y;
	}
	
	public void setCanvasSize(int width,int height){
		this.canvasWidth=width;
		this.canvasHeight=height;
	}

	public void setMapSize(int width,int height){
		this.mapWidth=width;
		this.mapHeight=height;
	}

	public void update(){
		this.x=(x_new+x*10)/11;
		this.y=(y_new+y*10)/11;
	} 
	
	
}
